package bit_exercises.Day12;
/**
 * @author zerorain
 * @date 2022/05/09 19:03
 **/
import java.util.*;
//题目ID 24951-二进制插入
//public class BinInsert {
//    public int binInsert(int n, int m, int j, int i) {
//        m<<=j;
//        return m|n;
//        }
//    }
//题目ID36884-查找组成一个偶数最接近的两个素数
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int half = n / 2;
            for (int i = half; i > 0; i--) {
                if (isPrime(i) && isPrime(n - i)) {
                    System.out.println(i);
                    System.out.println(n - i);
                    break;
                }
            }
        }
    }//素数的因数是1和它本身

    public static boolean isPrime(int num) {
        for (int i = 2; i * i <= num; i++) {
            if (num % i == 0) {
                return false;
            }
        }
        return true;
    }
}

